package com.baturu.mybatisminus.injector.dao;

import com.baturu.mybatisminus.dao.BaseDAO;
import com.baturu.mybatisminus.base.Pageable;
import com.baturu.mybatisminus.base.Sort;
import com.baturu.mybatisminus.injector.entity.Customer;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.Date;
import java.util.List;

/**
 * @author huangbin
 */
public interface CustomerDAO extends BaseDAO<Customer, Integer> {

    List<Customer> findByAddressLike(String address, Pageable pageable, Sort sort);

    List<Customer> findByAge(@Param("age") int age);

    List<Customer> findByAddressIn(Collection<String> addressList);

    int updateAgeByCustomerId(int age, int customerId);

    int deleteByCreateTimeBefore(Date createTime);
}
